Add TAL-Reverb-II plugin to test
[juce-lv2.git] / juce / source / extras / the jucer / src / model / jucer_GeneratedCode.h
blob6840495542c920a8cb6fe44c407a5f9150b0ec1d
1 /*
2 ==============================================================================
4 This file is part of the JUCE library - "Jules' Utility Class Extensions"
5 Copyright 2004-11 by Raw Material Software Ltd.
7 ------------------------------------------------------------------------------
9 JUCE can be redistributed and/or modified under the terms of the GNU General
10 Public License (Version 2), as published by the Free Software Foundation.
11 A copy of the license is included in the JUCE distribution, or can be found
12 online at www.gnu.org/licenses.
14 JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
15 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
18 ------------------------------------------------------------------------------
20 To release a closed-source product which uses JUCE, commercial licenses are
21 available: visit www.rawmaterialsoftware.com/juce for more information.
23 ==============================================================================
26 #ifndef __JUCER_GENERATEDCODE_JUCEHEADER__
27 #define __JUCER_GENERATEDCODE_JUCEHEADER__
29 class JucerDocument;
32 //==============================================================================
33 /**
34 A class for collecting the various snippets of c++ that will be assembled into
35 the final cpp and header files.
37 class GeneratedCode
39 public:
40 //==============================================================================
41 GeneratedCode (const JucerDocument* const document);
42 ~GeneratedCode();
44 //==============================================================================
45 void applyToCode (String& code,
46 const String& fileNameRoot,
47 const bool isForPreview,
48 const String& oldFileWithUserData = String::empty) const;
50 int getUniqueSuffix();
52 //==============================================================================
53 const JucerDocument* const document;
55 String className;
56 String componentName;
57 String parentClassInitialiser; // optional parent class initialiser to go before the items in the initialisers list
58 StringArray initialisers; // (a list of the member variables that need initalising after the constructor declaration)
59 String parentClasses;
60 String constructorParams;
61 String privateMemberDeclarations;
62 String publicMemberDeclarations;
63 StringArray includeFilesH, includeFilesCPP;
64 String constructorCode;
65 String destructorCode;
66 String staticMemberDefinitions;
67 String jucerMetadata;
69 struct CallbackMethod
71 String requiredParentClass;
72 String returnType;
73 String prototype;
74 String content;
75 bool hasPrePostUserSections;
78 OwnedArray <CallbackMethod> callbacks;
80 String& getCallbackCode (const String& requiredParentClass,
81 const String& returnType,
82 const String& prototype,
83 const bool hasPrePostUserSections);
85 void removeCallback (const String& returnType, const String& prototype);
87 void addImageResourceLoader (const String& imageMemberName, const String& resourceName);
89 const String getCallbackDeclarations() const;
90 const String getCallbackDefinitions() const;
91 const StringArray getExtraParentClasses() const;
93 private:
94 const String getClassDeclaration() const;
95 const String getInitialiserList() const;
96 int suffix;
98 GeneratedCode (const GeneratedCode&);
99 GeneratedCode& operator= (const GeneratedCode&);
103 #endif // __JUCER_GENERATEDCODE_JUCEHEADER__